package com.example.service;

import com.example.entity.User;
import com.example.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserService {
    @Autowired
    private UserMapper userMapper;

    public User findByUsername(User user){
        return userMapper.findByUsername(user.getUsername());
    }



    public User findUserById(String userId) {
        return userMapper.findUserById(userId);
    }

   public List<User> findAll(){
        return userMapper.findAll();
    }
}
